﻿{include file="public/header"}
<title>订单录入</title>
</head>
<body>


<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-member-add">
        <div class="row cl" style="margin-bottom: 10px">
            <label class="form-label col-xs-4 col-sm-1" style="width:23%;    text-align: right;">节点名称：</label>
            <div class="formControls col-xs-8 col-sm-1">
                <input type="text" class="form-control" name="node_name" placeholder=" 节点名称">
            </div>

        </div>
    <div class="row cl" style="margin-bottom: 10px">
        <label class="form-label col-xs-4 col-sm-1" style="width:23%;    text-align: right;">控制器名：</label>
        <div class="formControls col-xs-8 col-sm-1">
            <input type="text" class="form-control" name="control_name" placeholder=" 控制器名">
        </div>

    </div>
    <div class="row cl" style="margin-bottom: 10px">
        <label class="form-label col-xs-4 col-sm-1" style="width:23%;    text-align: right;">方法名：</label>
        <div class="formControls col-xs-8 col-sm-1">
            <input type="text" class="form-control" name="action_name" placeholder=" 方法名">
        </div>

    </div>
    <div class="row cl" style="margin-bottom: 10px">
        <label class="form-label col-xs-4 col-sm-1" style="width:23%;    text-align: right;">传递参数：</label>
        <div class="formControls col-xs-8 col-sm-1">
            <input type="text"  name="type_id" class="form-control" value="0">

        </div>

    </div>


        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <button class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
            </div>
        </div>

    </form>
</article>
{include file="public/footer"}
<script>

        $('.radius').click(function () {
            var src = "{:Url('index/role/dan_add')}?id=0";
            $.ajax({
                type: 'POST',
                url: src,
                dataType: 'json',
                data: $('form').serializeArray(),
                success: function (data) {
                    var res = JSON.parse(data);
                    if (res.code == 200) {
                        layer.msg(res.msg, {icon: 1, time: 2000}, function (index, layero) {
                            parent.location.reload()
                        });
                    } else {
                        layer.msg(res.msg, {icon: 5, time: 1000});
                    }

                },
                error: function (data) {
                    console.log(data.msg);
                },
            });

        });


</script>
</body>
</html>